From 214b80d864d9f9f77c857cf00672134b3176d2fe Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 3 Jun 2003 17:29:31 +0000 Subject: [PATCH] Avoide GNU C extension of math on a void pointer. --- gpsbabel/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpsbabel/util.c b/gpsbabel/util.c index 5013cae3b..52cfb4c19 100644 --- a/gpsbabel/util.c +++ b/gpsbabel/util.c @@ -449,13 +449,14 @@ pdb_write_double(void* ptr, double d) { char r[8]; int i; + char *optr = ptr; memcpy(r, &d, 8); doswap(); /* make sure i_am_little_endian is initialized */ for (i = 0; i < 8; i++) { int j = (i_am_little_endian)?(7-i):i; - *(char*)ptr++ = r[j]; + *optr++ = r[j]; } return; } -- 2.30.2